package com.java.demo;

import com.java.demo.Controller.UserController;
import com.java.demo.Controller.UserController2;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
* 启动类
 */
public class App {
    public static void main(String[] args) {
        ApplicationContext context =
                new ClassPathXmlApplicationContext("spring-config.xml");
        UserController userController = context.getBean("userController", UserController.class);
        userController.doMethod();

        UserController2 userController2 = context.getBean("userController2", UserController2.class);
        userController2.doMethod();
    }
}
